package projeto1;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;


import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTextField;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.SwingConstants;
import javax.swing.JButton;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.text.html.StyleSheet;
import javax.swing.AbstractAction;
import java.awt.event.ActionEvent;
import javax.swing.Action;
import java.awt.event.ActionListener;
import java.awt.Color;
import javax.swing.ImageIcon;
import java.awt.SystemColor;


import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;


import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTextField;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.SwingConstants;
import javax.swing.JButton;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.text.html.StyleSheet;
import javax.swing.AbstractAction;
import java.awt.event.ActionEvent;
import javax.swing.Action;
import java.awt.event.ActionListener;
import java.awt.Color;
import javax.swing.ImageIcon;
import java.awt.SystemColor;
import org.eclipse.wb.swing.FocusTraversalOnArray;
import java.awt.Component;

public class Main extends JFrame {

	private JPanel principal;
	
	
	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Main frame = new Main();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public Main() {
		setTitle("TRANSF\u00C1CIL");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 727, 467);
		principal = new JPanel();
		principal.setBackground(SystemColor.menu);
		principal.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(principal);
		principal.setLayout(null);
		
		JLabel lblBemVindoAo = new JLabel("SISTEMA TRANSF\u00C1CIL");
		lblBemVindoAo.setForeground(SystemColor.desktop);
		lblBemVindoAo.setHorizontalAlignment(SwingConstants.CENTER);
		lblBemVindoAo.setFont(new Font("Arial", Font.BOLD, 32));
		lblBemVindoAo.setBounds(-48, 11, 495, 72);
		principal.add(lblBemVindoAo);
		
		JButton btnLinha = new JButton("Linha 01");
		btnLinha.setForeground(SystemColor.desktop);
		btnLinha.setFont(new Font("Arial", Font.PLAIN, 20));
		btnLinha.setBounds(325, 120, 303, 43);
		principal.add(btnLinha);
		
		JLabel lblPorFavorEscolha = new JLabel("\u00C1REA USU\u00C1RIO:");
		lblPorFavorEscolha.setForeground(SystemColor.desktop);
		lblPorFavorEscolha.setFont(new Font("Arial", Font.PLAIN, 20));
		lblPorFavorEscolha.setBounds(33, 94, 692, 24);
		principal.add(lblPorFavorEscolha);
		
		JButton btnLinha_1 = new JButton("Linha 02");
		btnLinha_1.setForeground(SystemColor.desktop);
		btnLinha_1.setFont(new Font("Arial", Font.PLAIN, 20));
		btnLinha_1.setBounds(325, 188, 303, 50);
		principal.add(btnLinha_1);
		
		JButton btnManuteno = new JButton("Administrador");
		btnManuteno.setToolTipText("Ir para Tela de Login ADM");
		btnManuteno.setForeground(SystemColor.desktop);
		btnManuteno.addActionListener(new ActionListener() {
			//Chama login
			public void actionPerformed(ActionEvent e) {
				LoginAdm login = new LoginAdm();
				login.setVisible(true);
				Main.this.dispose(); 
			}
		});
		btnManuteno.setFont(new Font("Arial", Font.PLAIN, 15));
		btnManuteno.setBounds(529, 373, 153, 27);
		
		principal.add(btnManuteno);
		
		JLabel lblSelecioneALinha = new JLabel("Selecione a Linha de  \u00F4nibus desejada:");
		lblSelecioneALinha.setFont(new Font("Arial", Font.PLAIN, 11));
		lblSelecioneALinha.setBounds(371, 95, 234, 14);
		principal.add(lblSelecioneALinha);
		
		JLabel lblNewLabel = new JLabel("");
		lblNewLabel.setIcon(new ImageIcon("C:\\Users\\vania\\Desktop\\customLogo.gif.jpg"));
		lblNewLabel.setBounds(10, 309, 432, 91);
		principal.add(lblNewLabel);
		
		JLabel lblAcessoRestritoPara = new JLabel("Acesso restrito para ADM");
		lblAcessoRestritoPara.setBounds(543, 349, 128, 14);
		principal.add(lblAcessoRestritoPara);
		setFocusTraversalPolicy(new FocusTraversalOnArray(new Component[]{principal, lblBemVindoAo, btnLinha, lblPorFavorEscolha, btnLinha_1, btnManuteno, lblSelecioneALinha}));
	}
}
